'use strict';
// Declare app level module which depends on views, and core components
var application = angular.module('myApp', [
  'ui.router',
  'Controller',
  'Service'
]);

application.config(function($stateProvider, $urlRouterProvider) {
  $urlRouterProvider.otherwise("/home");
  $stateProvider
      .state('home', {
        url: '/home',
        views: {
          '': {
            templateUrl: '/views/main.html'
          },
          'page@home':{
            templateUrl: '/views/find/page.html',
            controller:'HomeCtrl'
          },
          'header@home':{
            templateUrl: '/views/header.html',
          },
          'content@home':{
            templateUrl: '/views/find/content.html',
            controller:'UserCtrl'
          },
          'footer@home': {
            templateUrl: '/views/footer.html',
          }
        }
      })
      .state('radio', {
        url: "/radio",
        views: {
          '': {
            templateUrl: '/views/radio/main.html'
          },
          'page@radio':{
            templateUrl: '/views/radio/page.html',
            controller:'RadioCtrl'
          },
          'header@radio':{
            templateUrl: '/views/header.html',
          },
          'content@radio':{
            templateUrl: '/views/radio/content.html',
            // controller:'UserCtrl'
          },
          'footer@radio': {
            templateUrl: '/views/footer.html',
          }
        }
      }).state('friend', {
        url: "/friend",
        views: {
          '': {
            templateUrl: '/views/radio/main.html'
          },
          'page@friend':{
            templateUrl: '/views/friend/page.html',
            controller:'FriendCtrl'
          },
          'header@friend':{
            templateUrl: '/views/header.html',
          },
          'content@friend':{
            templateUrl: '/views/friend/content.html',
            // controller:'UserCtrl'
          },
          'footer@friend': {
            templateUrl: '/views/footer.html',
          }
        }
      }).state('mine', {
          url: "/mine",
          views: {
            '': {
              templateUrl: '/views/mine/main.html'
            },
            'page@mine':{
              templateUrl: '/views/mine/page.html',
              controller:'MineCtrl'
            },
            'header@mine':{
              templateUrl: '/views/header.html',
            },
            'content@mine':{
              templateUrl: '/views/mine/content.html',
              // controller:'UserCtrl'
            },
            'footer@mine': {
              templateUrl: '/views/footer.html',
            }
          }
        });
});
